package com.bjut.dailyserver.controller;

import com.bjut.dailyserver.dao.TBriefNewsDao;
import com.bjut.dailyserver.entity.TBriefNews;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/briefNews")
public class TBriefNewsController {
    @Autowired
    TBriefNewsDao tBriefNewsDao;

    @RequestMapping("/findAll")
    @ResponseBody
    public Object findAll() { return tBriefNewsDao.findAll(); }

    @RequestMapping("/findBriefById")
    @ResponseBody
    public Object findById(int id) { return tBriefNewsDao.findById(id); }
}
